package org.webdb.jdbc.impl;

import java.io.IOException;

import com.healthmarketscience.common.util.AppendableExt;
import com.healthmarketscience.sqlbuilder.SqlObject;
import com.healthmarketscience.sqlbuilder.ValidationContext;

public class PGSequenceCall extends SqlObject {

    private String sequenceName;

    public PGSequenceCall(String sequenceName) {
        this.sequenceName = sequenceName;
    }

    @Override
    protected void collectSchemaObjects(ValidationContext vContext) {
    }

    @Override
    public void appendTo(AppendableExt a) throws IOException {
        a.append("SELECT NEXTVAL('" + sequenceName + "')");
    }

}
